home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
amok_lha
/
amok03.lha
/
Gels
/
vsprites.mod
< prev
next >
Wrap
Text File
|
1993-08-15
|
3KB
|
113 lines
MODULE VSprites;
FROM Arts IMPORT TermProcedure,BreakPoint,Assert;
FROM SYSTEM IMPORT ADR,ADDRESS,WORD;
FROM Exec IMPORT UByte;
FROM GfxMacros IMPORT InitAnimate;
FROM Graphics IMPORT ViewModeSet,InitGels,VSpriteFlags,VSpriteFlagSet,
InitMasks,AddBob,SortGList,DrawGList,(*collTable,*)
BobFlags,BobFlagSet,WaitTOF,SetAPen,Move,Draw,
VSpritePtr,BobPtr,GelsInfoPtr,AllocRaster,FreeRaster,
ViewPortPtr,RastPortPtr,AddVSprite,RemVSprite;
FROM Intuition IMPORT ShowTitle,RemakeDisplay;
FROM Heap IMPORT AllocMem;
FROM ImgDat IMPORT AIR1,AIR2,Imgheight,ImgPtr;
FROM OpenBDW IMPORT SCRH,SCRW,OpenBackDrop,ScreenP,BDWindowP;
FROM GelMacros IMPORT MakeVSprite;
VAR MyVPort :ViewPortPtr;
MyRPort :RastPortPtr;
i :LONGCARD;
(* Für die VSprites *)
VSprPt :ARRAY [AIR1..AIR2] OF VSpritePtr;
ColorSet1,ColorSet2 :ARRAY [0..2] OF CARDINAL;
(* für den Loop *)
Ciapra [0BFE001H] : SET OF (s0,s1,s2,s3,s4,s5,lmb);
PROCEDURE CleanUp;
BEGIN
END CleanUp;
BEGIN (*MAIN*)
(************************************************************************)
(*** Alles vorbereiten, Screen und Fenster auf ***)
(************************************************************************)
TermProcedure(CleanUp);
OpenBackDrop(2);
ShowTitle(ScreenP,TRUE);
MyRPort:=BDWindowP^.rPort;
MyVPort:=ADR(ScreenP^.viewPort);
ColorSet1[0]:=0F0BH;
ColorSet1[1]:=0000H;
ColorSet1[2]:=0F0EH;
ColorSet2[0]:=0FF9H;
ColorSet2[1]:=0000H;
ColorSet2[2]:=0FFEH;
MakeVSprite( VSprPt[AIR1],Imgheight,ImgPtr[AIR1],ColorSet1,100,50,1,2,
VSpriteFlagSet{vsprite},0,0,MyRPort);
AddVSprite(VSprPt[AIR1],MyRPort);
MakeVSprite( VSprPt[AIR2],Imgheight,ImgPtr[AIR2],ColorSet2,105,52,1,2,
VSpriteFlagSet{vsprite},0,0,MyRPort);
AddVSprite(VSprPt[AIR2],MyRPort);
(*
VSprPt[0]^.x:=VSprPt[0]^.x+1;
VSprPt[1]^.x:=VSprPt[1]^.x+1 ;
*)
WHILE lmb IN Ciapra DO
VSprPt[0]^.x:=VSprPt[0]^.x+4;
VSprPt[1]^.x:=VSprPt[1]^.x+5;
VSprPt[0]^.y:=VSprPt[0]^.y+1;
VSprPt[1]^.y:=VSprPt[1]^.y+1;
SortGList(MyRPort);
DrawGList(MyRPort,MyVPort);
WaitTOF();
RemakeDisplay;
END;
BreakPoint(ADR("Stop that yellow Balloon!"));
WHILE lmb IN Ciapra DO
VSprPt[0]^.x:=VSprPt[0]^.x+4;
VSprPt[0]^.y:=VSprPt[0]^.y+1;
VSprPt[1]^.y:=VSprPt[1]^.y+1;
SortGList(MyRPort);
DrawGList(MyRPort,MyVPort);
WaitTOF();
RemakeDisplay;
END;
BreakPoint(ADR("Remove the purple one!"));
RemVSprite(VSprPt[0]);
WHILE lmb IN Ciapra DO
VSprPt[1]^.y:=VSprPt[1]^.y+1;
SortGList(MyRPort);
DrawGList(MyRPort,MyVPort);
WaitTOF();
RemakeDisplay;
END;
END VSprites.